<?php

namespace App\Http\Controllers\user;

use App\Services\Logger;
use App\Services\XingKongPay;

class UsersController extends BaseController
{
    public function test()
    {
        //XingKongPay::pay([]);
        XingKongPay::wechat_openid('0c1KZ0100vWDuT14w2100EOD1i2KZ01I');
        exit();
        $uri = 'https://t-wapi.bhecard.com:8443/standard/native';

        $post_data = [
            'orgId'=>'ORG000000004784',
            'orgMercode'=>'531000023046245',
            'orgTermno'=>'33859055',
            'orgTrace'=>'ORG0'.'4784'.date('YmdHis').rand(100000,999999),

        ];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $uri);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data,JSON_UNESCAPED_UNICODE));

        $out = curl_exec($ch);
        curl_close($ch);
        var_dump($out);

    }

    /**
     * @return void
     */
    public function notice_pay(){
        Logger::notice_pay('pay',request()->all());
    }
}
